﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="View.aspx.cs" Inherits="Wicresoft.RDW.Announcement.View" %>

<%@ Register Src="../UserControls/PagerControl.ascx" TagName="PagerBasicControl"
    TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="main_title">
        <h2>
            <%=Resources.ManageResource.title_newsManage%></h2>
    </div>
    <div class="line_gray">
    </div>
    <br />
    <div>
        <asp:Label ID="lblDate" runat="server"></asp:Label>
        <asp:TextBox ID="txtFromDate" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="revtxtFromDate" runat="server" ErrorMessage="*"
            ForeColor="Red" Display="Dynamic" ControlToValidate="txtFromDate" ValidationExpression="20\d{2}-\d{2}-\d{2}"></asp:RegularExpressionValidator>
        <asp:Label ID="label1" runat="server" Text="-"></asp:Label>
        <asp:TextBox ID="txtToDate" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="revtxtToDate" runat="server" ErrorMessage="*"
            ForeColor="Red" Display="Dynamic" ControlToValidate="txtToDate" ValidationExpression="20\d{2}-\d{2}-\d{2}"></asp:RegularExpressionValidator>
        <asp:Label ID="lblLanguage" runat="server"></asp:Label>
        <asp:RadioButton ID="chbAll" GroupName="a" Checked="true" runat="server" />
        <asp:RadioButton ID="chbCN" GroupName="a" runat="server" />
        <asp:RadioButton ID="chbEN" GroupName="a" runat="server" />
        <asp:Button ID="btnQuery" runat="server" OnClick="btnQuery_Click" />
        <asp:Label ID="lblOverError" runat="server" ForeColor="Red"></asp:Label>
    </div>
    <div align="right">
        <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" />
    </div>
    <div class="HistoryApplicationContent">
        <asp:GridView ID="AnnouncementGW" runat="server" AutoGenerateColumns="false" ShowHeader="true"
            PagerSettings-Mode="NumericFirstLast" Width="100%" DataKeyNames="Id" OnRowUpdating="AnnouncementGW_RowUpdating"
            OnRowDataBound="AnnouncementGW_RowDataBound" OnRowDeleting="AnnouncementGW_RowDeleting"
            HeaderStyle-CssClass="dcTableHeader" RowStyle-CssClass="dcTableAlternatingItem"
            AlternatingRowStyle-CssClass="dcTableItem">
            <Columns>
                <asp:TemplateField ItemStyle-Width="4%">
                    <ItemTemplate>
                        <asp:Label ID="lblNum" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Subject" ItemStyle-Width="60%" />
                <asp:TemplateField ItemStyle-Width="12%">
                    <ItemTemplate>
                        <asp:Label ID="lblCreateBy" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="CreateTime" SortExpression="CreateTime" DataFormatString="[{0:yyyy-MM-dd}]"
                    HtmlEncode="false" ItemStyle-Width="12%"></asp:BoundField>
                <asp:TemplateField ItemStyle-Width="12%">
                    <ItemTemplate>
                        <asp:LinkButton class="CommandButton" ID="lbtnUpdate" runat="server" CausesValidation="False"
                            CommandName="Update" Text="Update"></asp:LinkButton>
                        <asp:LinkButton class="CommandButton" ID="lbtnDelete" runat="server" CausesValidation="False"
                            CommandName="Delete" Text="Delete"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <table width="100%">
                    <tr class="dcTableHeader">
                        <th width="4%">
                            <%=Resources.NameResource.No%>
                        </th>
                        <th width="60%">
                            <%=Resources.NameResource.Announcement_Subject%>
                        </th>
                        <th width="12%">
                            <%=Resources.NameResource.Announcement_CreateBy%>
                        </th>
                        <th width="12%">
                            <%=Resources.NameResource.Announcement_CreateTime%>
                        </th>
                        <th width="12%">
                            <%=Resources.ManageResource.mgr_lblAction%>
                        </th>
                    </tr>
                </table>
            </EmptyDataTemplate>
        </asp:GridView>
        <uc:PagerBasicControl ID="pager" runat="server" PageSize="20" />
    </div>
    <script type="text/javascript">
        var txtSartDate = $("#<%=txtFromDate.ClientID %>");
        var txtEndDate = $("#<%=txtToDate.ClientID %>");
        $(function () {
            txtSartDate.datepicker({ dateFormat: 'yy-mm-dd' });
            txtEndDate.datepicker({ dateFormat: 'yy-mm-dd' });
        });
    </script>
</asp:Content>
